package com.wze.wze.Util;

import com.auth0.jwt.JWT;
import com.auth0.jwt.algorithms.Algorithm;
import org.springframework.stereotype.Component;

@Component
public class TokenTool {
    public String getToken(String UName){//生成Token
        String Token="";//Token
        Token= JWT.create().withAudience(UName).sign(Algorithm.HMAC256(UName));//生成Token
        System.out.println(Token);
        return Token;
    }
}
